package com.zzg.springboot.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;

@Configuration
public class MyWebMVCConfig extends WebMvcConfigurerAdapter {
	/**
	 * 
	 * <p>Title: addResourceHandlers</p>   
	 * <p>Description:更新资源 </p>   
	 * @param registry   
	 * @see org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter#addResourceHandlers(org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry)
	 */
	@Override
	public void addResourceHandlers(ResourceHandlerRegistry registry) {
		// TODO Auto-generated method stub
		// 根路径资源访问，重新定义资源文件夹位置
		registry.addResourceHandler("/**").addResourceLocations("classpath:/my/");
		super.addResourceHandlers(registry);
	}
	
	

}
